﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IcbcOpenDemo
{

    public class Cg
    {
        #region 共享使用的资源（APP_ID、私钥、网关公钥、开台IP）
        // APP_ID工行提拱
        private static string APP_ID = "10000000000000187514";

        // 私钥，使用密钥生成工具生成密钥对，公钥交给工行录入到开放平台系统中，私钥由客户保存
        private static string PRIVATE_KEY = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCvdD1ku0eCB8ABMY+FBAbqCbJ/KM4VNMIs5QAY5skDYisoqOs7PJKk3b6MahoDjYe3wbzStV1yAO9VUHAccxyxEc4rYOkqKVmPTZ7iGQ/lBBsZYiqVWtYSCfqmqYUHtD3TFjiiFFgrHxzGnI+tF7mGCZA7qAixgfYEk5pgfS76uliMOQIH9MKGBzO+D/LtO7sp1aSJ560H/c6O8B8LzsrB5Z57bXjd5kjLkQ4zpBkVGrl3uUjpTR1FTnohIOCDoLNGNLCDbQkbbjgmDMBfbzdd7ueivXPO34EsafFYY2g/lpD7Jo1k8Orfk5TGjx5L2HgBpwZyFOWZ9Dv8tf2s15VTAgMBAAECggEBAJ4F4W2iR2tTs5jfnFW/JMMRbNSeWc47sE9jCU1kPtNvTVPXn9XAXotitEYfIcLla8ETGw/kDX+qW+TJB9B31PWeBcSICjjQ+TraPCmDTQ+FPSsFgTj3kSq6FiiZMZmYur4tm2BPVoGwCejQBY9ueMfCQUeZtgq59Gx2zGnvFar3P86nNUAziKvK2mgrjzSrkckkBI049XUJP1YWj9ZrZtQS/yPcamelbopbgYOrCOr+9kpOWpBse7fI5mmwvNj/o1RrcK+dJw0bGwZGAPDAVp6Mcpk2XtK/vLhkg+hA0pgbZDc2xGoTXd0+Df4UrOjhNEfH/rpKeT8yZM8mh9IElbECgYEA5hvSfQdureH/xfAjeXRAaySyegOLaYcYkC9xN8Amt1pewB5Vg3QQ1i67sQuijN34Sqd6cBB/Y35tGM28ONbiE1eNsD76CVyPqTtfR2DNLrHT1OtXQIwC7sdIRO+eHbE0TcF7Su0dZlm2XELKCbAdzlE33xSUm7kpgMfZzhYJGpcCgYEAwzIdn1kVVsi0kph9vALNQnNcTdT3tcbVAQhJTDBcwLdP9vW1WY5etxiNdK8jXZvrfnKLayrqzQGcPxPigXvSApDP50xyjcHuP81zMckMFjEBoHq6YfU5wHZ954L0agfW2bFpSSS80VRuOJeazp5bX1JNGwVMFu+v3g+o2R06XqUCgYEA46630PqfqvGpsOLxVuWOL/W5mz0SnrILve8TaYR5Sobipdnd5xna5vKKyJ2okxW27bdVULkiMwIPVLGNAfis7VJ+YduOb+DkTSDwH6JKo19VKKJMTRO8eyM4AO3PV7XU+PLu2a5Qnss5w4RagMeAVnrKe7LTcFoAFOqqOl5XV7UCgYBdMPsVjdlzQoV7i9RTw96tgBgsjKXrIk+lm4grGNffpmVGGc8IP8GWluFKOSegVIWdLCDF/Ip3b/Jh5yN4AF6mnO61ljkG1vThfzwlI8Big+kr7gw4InT9H1VDB7GbQbzg2CPVKPYA1td8q1zckpw7KTbo1KGcPbjwQvexGJQ6hQKBgQCdluw0KGTJ8XTe+h/ImlfC2xyjAjAalGmZSCigte+QMNCXcHWsO45nAC4Yj50DPJ5Ok4Jns7AvWtewiSRC2q8JJkbdOxiy2+0CvWXZBIbcpTM4XKbSedmCjQf9bdUDpAAGoAwVyQww03FTwGn5vX1E8aAOIxbX8nssMrQfzrgYsA==";

        // API网关公钥，用来验签API返回的信息
        private static string PUBLIC_Gateway_KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmSJ0IMT8AWzkJJd7LbZNQS4kTXes7iy5mJMUwogIlhxzegvxXEF9lHbgli9vAQQqUVy64nFeOH6drO+db9e3vZPSND3ATeh7MedahUDVcEKFMHBbffn8f+0raf+zNKY/+wriWHhXrDpGdcKN4Ujlpc1eRkgOLjTBvtcuhNg9igc4+IG9i6QWTtRecvwzDru8HW0gEhG6CX/VXzSlMQWuBfG9hlY/1whX3Y843f8nU4ffUqOBUVbappEut52FK1TD9pj/an/2r9D+rjE+d9WTs5FJCp22lMud9lyU/g0+bmGIXCFMIca/Ntz32atCCH2MN8sZVJr8BC562FwIBo1sQQIDAQAB";

        // API网关请求址，注意最后加上"/"
        private static string APIServiceUrl = @"https://apipcs3.dccnet.com.cn/api/";  // 第三套测试环境
        #endregion

        DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2, PRIVATE_KEY, PUBLIC_Gateway_KEY);

        SettlementAccountBalanceQueryRequestV1 request = new SettlementAccountBalanceQueryRequestV1();
        ///新建服务请求类的业务参数类，该类为内部类
        SettlementAccountBalanceQueryRequestV1.SettlementAccountBalanceQueryRequestV1Biz bizContent = new SettlementAccountBalanceQueryRequestV1.SettlementAccountBalanceQueryRequestV1Biz();



    }
}
